parse error before `>' token

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nitin

    parse error before `>' token

    HI
    I am getting the following error while trying to compile my program

    /usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token

    namespace std
    47 {
    48 template<typena me _Alloc>
    49 class allocator;
    50
    51 template<class _CharT>
    52 struct char_traits;
    53
    54 template<typena me _CharT, typename _Traits = char_traits<_Ch arT>,
    55 typename _Alloc = allocator<_Char T> >
    56 class basic_string;


    Can sumone tell me the possible solution to it

    Thanks
  • Michael Dean

    #2
    Re: parse error before `&gt;' token

    nitin wrote:
    [color=blue]
    > HI
    > I am getting the following error while trying to compile my program
    >
    > /usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token
    >
    > namespace std
    > 47 {
    > 48 template<typena me _Alloc>
    > 49 class allocator;
    > 50
    > 51 template<class _CharT>
    > 52 struct char_traits;
    > 53
    > 54 template<typena me _CharT, typename _Traits =
    > char_traits<_Ch arT>,
    > 55 typename _Alloc = allocator<_Char T> >
    > 56 class basic_string;
    >
    >
    > Can sumone tell me the possible solution to it
    >
    > Thanks[/color]

    That's not enough information to tell. The file is fine (I double checked
    against my own local one to be sure; I'm guessing you're on RedHat 9 like I
    am?)
    It probably has to do with your compiler configuration and/or something
    included before it, or how it was included. You need to provide that
    information for help with this.

    Comment

    • David Cattarin

      #3
      Re: parse error before `&gt;' token

      nitin_gambhir@y ahoo.com (nitin) wrote in message news:<db3db854. 0307070227.3b5a d2a2@posting.go ogle.com>...[color=blue]
      > HI
      > I am getting the following error while trying to compile my program
      >
      > /usr/include/c++/3.2.2/bits/stringfwd.h:48: parse error before `>' token
      >
      > namespace std
      > 47 {
      > 48 template<typena me _Alloc>
      > 49 class allocator;
      > 50
      > 51 template<class _CharT>
      > 52 struct char_traits;
      > 53
      > 54 template<typena me _CharT, typename _Traits = char_traits<_Ch arT>,
      > 55 typename _Alloc = allocator<_Char T> >
      > 56 class basic_string;
      >
      >
      > Can sumone tell me the possible solution to it[/color]

      Did you include <memory>?
      Dave

      Comment

      Working...